<template>
  <div>
    <el-form ref="form" :model="form" label-width="120px">
      <el-divider content-position="left" class="title">会员信息</el-divider>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="用户名">
            <el-input placeholder="" style="width: 75%"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="手机号">
            <el-input placeholder="" style="width: 75%"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="密码">
            <el-input placeholder="" style="width: 75%"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left" class="title">简历信息</el-divider>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="姓名">
            <el-input placeholder="" style="width: 75%"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="性别">
            <el-radio-group v-model="radio">
              <el-radio :label="3">保密</el-radio>
              <el-radio :label="6">男</el-radio>
              <el-radio :label="9">女</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="出生日期">
            <el-date-picker
              v-model="value1"
              type="monthrange"
              range-separator="至"
              start-placeholder="开始月份"
              end-placeholder="结束月份"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="最高学历">
            <el-select v-model="model" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="参加工作时间">
            <el-date-picker
              v-model="value1"
              type="monthrange"
              range-separator="至"
              start-placeholder="开始月份"
              end-placeholder="结束月份"
            >
            </el-date-picker>
            <el-checkbox v-model="checked" style="margin-left: 20px"
              >应届生/无经验</el-checkbox
            >
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="求职状态">
            <el-select v-model="model" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="婚姻状态">
            <el-radio-group v-model="model">
              <el-radio :label="label">保密</el-radio>
              <el-radio :label="label">未婚</el-radio>
              <el-radio :label="label">已婚</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="现居住地">
            <el-input placeholder="" style="width: 75%"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="12">
          <el-form-item label="所学专业">
            <el-select v-model="model" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="6">
          <el-form-item label="照片" style="display: flex;">
            <el-upload
              class="avatar-uploader"
              action="https://jsonplaceholder.typicode.com/posts/"
              :show-file-list="false"
              :on-success="handleAvatarSuccess"
              :before-upload="beforeAvatarUpload"
            >
              <img v-if="imageUrl" :src="imageUrl" class="avatar" />
              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
            </el-upload>
             <span>
            <i class="el-icon-info"></i>
            建议尺寸120*120
          </span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left" class="title">求职意向</el-divider>
      <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="工作性质">
              <el-radio-group v-model="model">
                  <el-radio :label="label">全职</el-radio>
                  <el-radio :label="label">兼职</el-radio>
                  <el-radio :label="label">实习</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="意向职位">
              <el-select v-model="model" placeholder="请选择">
                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
              </el-select>
            </el-form-item>
          </el-col>
      </el-row>
      <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="工作地区">
              <el-select v-model="model" placeholder="请选择">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="期望薪资">
              <el-select v-model="model" placeholder="请选择">
                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
              </el-select>
               <el-select v-model="model" placeholder="请选择">
                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
              </el-select>
            </el-form-item>
          </el-col>
      </el-row>
      <el-row :gutter="10">
          <el-col :span="6">
            <el-form-item label="期望行业">
              <el-select v-model="model" placeholder="请选择">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
            </el-form-item>
          </el-col>
      </el-row>
      <el-divider content-position="left" class="title">联系信息</el-divider>
      <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="手机号">
              <el-input placeholder="" style="width: 75%"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="微信">
              <el-input placeholder="" style="width: 75%;"></el-input>
            </el-form-item>
          </el-col>
      </el-row>
      <el-row :gutter="10">
          <el-col :span="3">
            <el-form-item label="">
              <el-button type="primary" size="small">保存</el-button>
            </el-form-item>
          </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      imageUrl: "",
    };
  },
  methods: {
    handleAvatarSuccess(res, file) {
      this.imageUrl = URL.createObjectURL(file.raw);
    },
    beforeAvatarUpload(file) {
      const isJPG = file.type === "image/jpeg";
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG 格式!");
      }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
      }
      return isJPG && isLt2M;
    },
  },
};
</script>

<style lang="scss" scoped>
.title {
  margin: 40px 0;
  font-size: 16px;
  font-weight: 700;
  color: #303133;
}
.el-upload {
  display: inline-block;
  text-align: center;
  cursor: pointer;
  outline: 0;
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  width: 122px;
  height: 122px;
}
</style>
